const Router = require('koa-router')

const router = new Router({ prefix: '/post' })
const { uploadFile } = require('../middleware/user_middleware')
const { paramsVaild } = require('../middleware/friend_middleware')
const { artileVAild, UploadFileControlle } = require('../middleware/post_middleware')
const { PostArticle, PostList, deleteList } = require('../controller/Post_controller')

const { auth } = require('../middleware/auth_middleware')

router.post('/article', auth, uploadFile, artileVAild, UploadFileControlle, PostArticle)

router.get('/article', auth, paramsVaild, PostList)

router.delete('/article', auth, deleteList)

module.exports = router